import request from "@/utils/request/http"

/**
 * @param {*} 立即签到
 * @returns 
 */
export function userSignIn() {
  return request({
    url: '/user/sign',
    method: "POST",
  })
}

/**
 * @param {*} 获取连续签到时长
 * @returns 
 */
export function signCount() {
  return request({
    url: '/user/sign/count',
    method: "POST"
  })
}

/**
 * @param {*} 获取当前可用卡券
 * @returns 
 */
export function getcouponNumberData() {
  return request({
    url: '/storage/couponNumber',
    method: "POST",
  })
}

/**
 * @param {*} 获取今天是否已经签到了
 * @returns 
 */
export function todaySignInfo() {
  return request({
    url: '/user/todaySignInfo',
    method: "POST",
  })
}

/**
 * @param {*} 获取用户的购买了的券
 * @returns 
 */
export function getStorageList(data) {
  return request({
    url: '/storage/list',
    method: "POST",
	data
  })
}

/**
 * @param {*} 获取积分商城内商品列表
 * @returns 
 */
export function getCommodityList(data) {
  return request({
    url: '/commodity/list',
    method: "POST",
	data
  })
}
/**
 * @param {*} 获取单个商品列表
 * @returns 
 */
export function getCommodityInfo(data) {
  return request({
    url: '/commodity/info',
    method: "POST",
	data
  })
}

/**
 * @param {*} 当前用户执行购买商城商品操作
 * @returns 
 */
export function commodityPurchase(data) {
  return request({
    url: '/commodity/purchase',
    method: "POST",
	data
  })
}

/**
 * @param {*} 用户的某张券在门店被使用的时候，调用这个接口
 * @returns 
 */
export function storageCouponUse(data) {
  return request({
    url: '/storage/couponUse',
    method: "POST",
	data
  })
}

/**
 * @param {*} 当月打卡记录
 * @returns 
 */
export function querySignInfo() {
  return request({
    url: '/user/sign/info',
    method: "POST",
    
  })
}

/**
 * @param {*} 积分明细
 * @returns 
 */
export function getDetailList(data) {
  return request({
    url: '/details/list',
    method: "POST",
	data
  })
}

/**
 * @param {*} 签到列表查询(按日期)
 * @returns 
 */
 export function signInRecordByDays(data) {
  return request({
    url: 'work/signIn/signInRecordByDays',
    method: "GET",
    params: data
  })
}


